package com.lzx.article.feign;

import com.lzx.article.vo.User;
import com.lzx.common.entity.Inform;
import com.lzx.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 程序员星星
 * @date 2023/1/12
 * @Description
 */
@Component
@FeignClient("five-cube-user")
public interface UserClient {
    //根据id获取用户信息
    @GetMapping("/user/user/web/toOtherServe/{id}")
    User getUserinfoByIdToOtherServe(@PathVariable Long id);

    //用户点赞问题，用户积分+1
    @PostMapping("/user/user/web/likeProblem/{userId}")
    R likeProblem(@PathVariable Integer userId);

    //获取所有用户id
    @GetMapping("/user/user/web/getUserIdList")
    List<Long> getUserIdList();

    //保存通知
    @PostMapping("/user/inform/web/saveInform")
    String saveInform(@RequestBody Inform inform);
}
